import Vue from 'vue';
import Vuex from 'vuex';

let appStore = new Vuex.Store({
	modules: {
		main: {
			state: {
				trees: [],
				treeNodeMap: {},
				companyMap: {},
				projectMap: {},
				userMap: {},
				buildingMap: {},
				projectSelected: {
					entityId: '',
					projectName: '',
					userIds: [],
					buildingIds: [],
					parentProjectId: null
				}
			}
		}
	}
});

let eventBus = new Vue({});

export default { appStore, eventBus };